define("lib/Timer.js", function(require, module, exports, window, document, frames, self, location, navigator, localStorage, history, Caches, screen, alert, confirm, prompt, XMLHttpRequest, WebSocket, Reporter, webkit, WeixinJSCore) {
  "use strict";
  Object.defineProperty(exports, "__esModule", {
      value: !0
  }), exports.default = void 0;
  var e = require("../@babel/runtime/helpers/classCallCheck"),
      t = require("../@babel/runtime/helpers/createClass"),
      i = function() {
          function i(t) {
              e(this, i);
              var l = t.duration,
                  a = void 0 === l ? 1 : l,
                  n = t.interval,
                  r = void 0 === n ? 1e3 : n,
                  s = t.intervalCallBack,
                  u = void 0 === s ? null : s,
                  v = t.endCallback,
                  _ = void 0 === v ? null : v;
              this._time = a, this._intervalId = null, this._interval = r, this._isPaused = !1, this._intervalCallBack = u, this._endCallback = _
          }
          return t(i, [{
              key: "time",
              get: function() {
                  return this._time
              },
              set: function(e) {}
          }, {
              key: "reset",
              value: function(e) {
                  clearInterval(this._intervalId), this._intervalId = null, this._time = e || 1
              }
          }, {
              key: "start",
              value: function() {
                  var e = this;
                  this._intervalId || (this._intervalId = setInterval((function() {
                      e._isPaused || (e._time--, e._intervalCallBack && e._intervalCallBack(e._time), 0 === e._time && (clearInterval(e._intervalId), e._intervalId = null, e._endCallback && e._endCallback()))
                  }), this._interval))
              }
          }, {
              key: "pause",
              value: function() {
                  this._intervalId ? this._isPaused = !0 : console.log("\u6682\u505c\u65e0\u6548")
              }
          }, {
              key: "continue",
              value: function() {
                  this._intervalId ? this._isPaused = !1 : console.log("\u91cd\u542f\u65e0\u6548")
              }
          }, {
              key: "destory",
              value: function() {
                  this._intervalId && clearInterval(this._intervalId)
              }
          }]), i
      }();
  exports.default = i;
});